package OOP.day08.PersonDemo;

public class Teacher extends Person {
    String office;//办公室
    String subject;//教授科目

    public Teacher(){

    }

    public Teacher(String name, int age, String address,  String office, String subject) {
        super(name, age, address);
        this.office = office;
        this.subject = subject;
    }

    //上课
    public void teaching() {
        System.out.println(name.charAt(0) + "老师正在上" + subject + "课");
    }

    //摸鱼
    @Override
    public void sleep() {
        System.out.println(name.charAt(0) + "老师在" + office + "办公室睡觉摸鱼");
    }
}
